package com.team1.supervend.domain;

/*loop inserting bills and coins 
 * include object class that simulates
 * hardware vending capability
 * pass it info to know what its vending
 * don't save sale, calc taxes or inventory
 * updates
 */

public class SuperVendTestDriver {
	static Company company;
		
	public static void main(String[] args) {
		int id;
		int quantity;
	
		//build  SuperVend instance
    
        // Create new Company
		company = new Company();

        // Company Installs SuperVend
		company.runSuperVend();
		
		SuperVend superVend = company.getSuperVend();
		
		//begin transaction
		System.out.println(" ");
		System.out.println("***TestDrive Start***");
		System.out.println(" ");
		superVend.startSale();
		
		//customer inserts pre-payment
		System.out.println(" ");
		System.out.println("***TestDrive Add Cash***");
		System.out.println(" ");
		superVend.makePayment(1.0f);
		superVend.makePayment(0.5f);
		
		//customer selects items
		System.out.println(" ");
		System.out.println("***TestDrive Adds a Pack of Gum***");
		System.out.println(" ");
		id = 1;
		quantity = 1;	
		superVend.selectItem(id, quantity);
		
		System.out.println(" ");
		System.out.println("***TestDrive Adds a Coke***");
		System.out.println(" ");
		id = 2;
		quantity = 1;	
		superVend.selectItem(id, quantity);
		
		System.out.println(" ");
		System.out.println("***TestDrive Adds two bags of Chips***");
		System.out.println(" ");
		id = 3;
		quantity = 2;	
		superVend.selectItem(id, quantity);
		
		System.out.println(" ");
		System.out.println("***TestDrive Adds a box of Bandages***");
		System.out.println(" ");
		id = 4;
		quantity = 1;	
		superVend.selectItem(id, quantity);
		
		//customer completes sale
		superVend.completeSale();
		
		//customer adds payment to complete sale
		System.out.println(" ");
		System.out.println("***TestDrive inserts final payment***");
		System.out.println(" ");
		superVend.makePayment(10.0f);
		
		superVend.completeSale();
		
		
		
	}
}
